<!-- <template>
  <div>
    <button @click="openConversationList">打开会话列表</button>
    <button @click="openContact">打开联系人</button>
  </div>
</template>
<script>
export default {
  methods: {
    // 打开会话列表
    openConversationList() {
      uni.navigateTo({ url: '/TUIKit/components/TUIConversation/index' });
    },
    // 打开联系人
    openContact() {
      uni.navigateTo({ url: '/TUIKit/components/TUIContact/index' });
    },
  },
};
</script> -->
<template>
	<button @click="openChat">OpenChat</button>
</template>
<script>
	import {
		genTestUserSig
	} from '@/debug/GenerateTestUserSig.js';
	export default {
		onLoad(options) {
			this.id = options.id
		},
		data() {
			return {
				id:'',//
			};
		},
		methods: {
			openChat() {
				// console.log(this.user.id)
				// return
				// 1v1 chat: conversationID = `C2C${userID}`
				// group chat: conversationID = `GROUP${groupID}`
				const conversationID = `C2C${this.id}`;
				uni.navigateTo({
					url: `/TUIKit/components/TUIChat/index?conversationID=${conversationID}`
				});
			},
		}
	}
</script>